<?php
import("@.ORG.BaseRelationModel");       //导入分页类
class OrderModel extends BaseRelationModel {
  protected $_link = array(
    'MiniKehu' => array(
      'mapping_type' => BELONGS_TO, 
      'class_name' =>'MiniKehu',
      'foreign_key' =>'mini_client_id',
      'mapping_name' =>'mini_kehu',
    ),
    //'Product' => array(
      //'mapping_type' => BELONGS_TO, 
      //'class_name' =>'Product',
      //'foreign_key' =>'product_id',
      //'mapping_name' =>'product',
    //),
    'CreatedUser' => array(
      'mapping_type' => BELONGS_TO, 
      'class_name' =>'User',
      'foreign_key' =>'created_user_id',
      'mapping_name' =>'created_user',
    ),
    'ContactPerson' => array(
      'mapping_type' => BELONGS_TO, 
      'class_name' =>'ContactPerson',
      'foreign_key' =>'contact_person_id',
      'mapping_name' =>'contact_person',
    ),
    'OrderItem' => array(
      'mapping_type' => HAS_MANY, 
      'class_name' =>'OrderItem',
      'foreign_key' =>'order_id',
      'mapping_name' =>'order_item',
    ),

  );

}
?>
